// 公共样式类

.page {
    position: relative;
    overflow: auto;
    height: calc(100vh - 65px);
    width: 100%;
    padding: 10px;
    text-align: left;
}

.page-card {
    position: relative;
    min-height: calc(100vh - 85px);
    width: calc(100%);
}

// 表格样式
.table {
    margin: 10px;
    border-spacing: 0;
    border-collapse: collapse;
    background-color: #fff;
    width: calc(100% - 20px);
    box-sizing: border-box;
    border-color: #e8eaec;
    td,
    th {
        padding: 0;
    }
    tr {
        height: 30px;
        &:nth-child(odd) {
            background-color: #f8f8f9;
        }
        &:nth-child(even) {
            background-color: #fff;
        }
    }
}

/* 禁止图片拖拽 */
.img-user-drag {
    user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* 禁止复制文字 */
.img-user-drag {
    user-select: none;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* line 分割线：vertical竖线 */
.divider-line-vertical {
    margin: 0 12px;
    height: 50%;
    width: 2px;
    border-radius: 10px;
    background-color: #060606;
}

/* start--定义常用的弹性布局--start */
.flex {
    display: flex;
    flex-direction: row;
    align-items: center;
}

// 竖型排列
.flex-col {
    flex-direction: column;
}

// 全部居中对齐
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

// 换行
.flex-wrap {
    flex-wrap: wrap;
}

// 不换行
.flex-nowrap {
    flex-wrap: nowrap;
}

// 垂直居中
.flex-col-center {
    align-items: center;
}

// 顶部对齐
.flex-col-top {
    align-items: flex-start;
}

// 底部对齐
.flex-col-bottom {
    align-items: flex-end;
}

// 左边对齐
.flex-row-left {
    justify-content: flex-start;
}

// 水平居中
.flex-row-center {
    justify-content: center;
}

// 右边对齐
.flex-row-right {
    justify-content: flex-end;
}

// 水平两端对齐，项目之间的间隔都相等
.flex-row-between {
    justify-content: space-between;
}

// 水平每个项目两侧的间隔相等，所以项目之间的间隔比项目与父元素两边的间隔大一倍
.flex-row-around {
    justify-content: space-around;
}

.flex(@index) when (@index > 0) {
    .flex-@{index} {
        flex: @index;
    }
    .flex(@index - 1);
}
.flex(13);
/* end--定义常用的弹性布局--end */

/* start--圆角值--start */
.border-radius-10 {
    border-radius: 10px;
}

.border-radius-14 {
    border-radius: 14px;
}
/* end--圆角值--end */

/* start--边距类--start */
.margin-padding(@index) when (@index > 0) {
    @num: @index * 5;
    .m-l-@{num} {
        margin-left: @index * 5px;
    }
    .m-r-@{num} {
        margin-right: @index * 5px;
    }
    .m-t-@{num} {
        margin-top: @index * 5px;
    }
    .m-b-@{num} {
        margin-bottom: @index * 5px;
    }
    .p-l-@{num} {
        padding-left: @index * 5px;
    }
    .p-r-@{num} {
        padding-right: @index * 5px;
    }
    .p-t-@{num} {
        padding-top: @index * 5px;
    }
    .p-b-@{num} {
        padding-bottom: @index * 5px;
    }
    .margin-padding(@index - 1);
}
.margin-padding(8);
/* end--边距类--end */

/* start--文本行数限制--start */
.line-1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.line-2 {
    -webkit-line-clamp: 2;
}

.line-3 {
    -webkit-line-clamp: 3;
}

.line-4 {
    -webkit-line-clamp: 4;
}

.line-5 {
    -webkit-line-clamp: 5;
}

.line-2,
.line-3,
.line-4,
.line-5 {
    overflow: hidden;
    word-break: break-all;
    text-overflow: ellipsis;
    display: -webkit-box; // 弹性伸缩盒
    -webkit-box-orient: vertical; // 设置伸缩盒子元素排列方式
}

/* end--文本行数限制--end */

/* start--字体大小--start */
.font-size(@index) when (@index > 9) {
    .font-size-@{index} {
        font-size: @index * 1px;
    }
    .font-size(@index - 1);
}
.font-size(36);
/* end--字体大小--end */
